home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPPANS.ZIP / SMALLWIN.CPP < prev    next >
C/C++ Source or Header  |  1991-07-08  |  845b  |  35 lines

  1. // smallwin.cpp -- Use cwindow class to display a window
  2.  
  3. #include <iostream.h>
  4. #include "window.h"
  5. #include "key.h"
  6.  
  7. main()
  8. {
  9.   winStruct ws = {
  10.     6, 20, 40, 12, // row, column, width, height
  11.     0x07,          // text attribute
  12.     0x0f,          // border attribute
  13.     0x70,          // highlight attribute
  14.     1              // border type
  15.   };
  16.   cwindow *wp;       // Define pointer to window
  17.   
  18.   cwindow::startup();
  19.   wp = new cwindow(ws, " Small Window ");
  20.   wp->showWindow();
  21.   wp->gotorc(2, 4);
  22.   wp->puts("Press <Esc> to quit...");
  23.   while (getKey() != 27) ;
  24.   delete wp;
  25.   cwindow::shutDown();
  26. }
  27.  
  28.  
  29. // Copyright (c) 1990 by Tom Swan. All rights reserved
  30. // Revision 1.00    Date: 10/26/1990   Time: 05:37 pm
  31.  
  32. // Revision 1.01    Date: 07/08/1991   Time: 05:41 pm
  33. // Converted for Borland C++ 2.0
  34.  
  35.